package cn.micro.system.manage.controller;


import cn.micro.system.manage.common.result.Result;
import cn.micro.system.manage.entity.vo.SysOperLogQueryVo;
import cn.micro.system.manage.service.SysOdsOperLogService;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志记录 前端控制器
 * </p>
 *
 * @author wr
 * @since 2023-12-25
 */
@RestController
@RequestMapping("/manage/sysDimOperLog")
@RequiredArgsConstructor
public class SysOdsOperLogController {

    private final SysOdsOperLogService sysOdsOperLogService;


    @GetMapping("/{page}/{size}")
    @PreAuthorize("hasAuthority('bnt.sysOperLog.list')")
    public Object list(@PathVariable int page, @PathVariable int size, SysOperLogQueryVo vo){
        return Result.success(new PageInfo<>(sysOdsOperLogService.selectPage(page,size,vo)));
    }

}
